﻿using System;
using AMM.Model;
using AMM.Model.Config;

namespace AMM.UserControls {
    public partial class UserSearchControl : BaseSearchControl {

        public override BaseSearchModel GetSearchModel() {
            UserSearchModel searchResult = new UserSearchModel();
            searchResult.Name = this.tbName.Text;
            searchResult.CreateDate = this.GetDateTimePickerValue(this.dtpCreateDatetime);
            return searchResult;
        }

        public override void ResetSearchModel() {
            this.tbName.Clear();
            this.dtpCreateDatetime.Value = DateTime.Now;
        }

        public UserSearchControl() {
            this.InitializeComponent();
        }

    }
}
